package com.dpi.cgdc.data.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dpi.cgdc.data.entity.RawData;
import com.dpi.cgdc.data.mapper.ck.RawDataMapper;
import com.dpi.cgdc.data.service.RawDataService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: Zhangbochao
 * @Date: 10:12 2025/2/6
 * @Description:
 * @modifiedBy:
 * @Version: 1.0
 */
@Service
public class RawDataServiceImpl extends ServiceImpl<RawDataMapper, RawData> implements RawDataService {

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void batchInsert(List<RawData> list) {
        if (CollectionUtils.isEmpty(list)) {
            return;
        }
        this.baseMapper.batchInsert(list);
    }
}
